/**
 * Created by dllo on 3/29/18.
 */
public class Question03 {

    // 打印出 所有的三位水仙花数
    public static void main(String[] args) {


        for (int i = 100; i < 1000; i++) {


            int hundreds = i / 100;
            int tens = i % 100 / 10;
            int num = i % 10;

            if (i == hundreds * hundreds * hundreds
                    + tens * tens * tens
                    + num * num * num) {

                System.out.println(i);
            }
        }
    }
}
